package com.ly.spring;


import com.ly.spring.mapper.UserMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.ly.spring")
public class AutowireAnnoConfig {

    @Bean("myUserMapper")
    public UserMapper userMapper(){
        UserMapper userMapper = new UserMapper();
        userMapper.setMyName("李四");
        return userMapper;
    }
}
